const router = require('koa-router')();
const auth =require('../middleware/auth')
const {getCartList,addToCart,delCart,setCartCount} = require('../controller/cart')
router.get('/cart/list',auth, getCartList)
// 加入购物车
router.post('/cart/add', auth,addToCart)
router.delete('/cart/delete/:id', auth,delCart)
router.put('/cart/setCount', auth,setCartCount)
module.exports = router;